package restaurant;
public class OrderItem{

	private int tableid;
	private String name;
	private int quantity;

	public OrderItem(int tableid, String name, int quantity) {
		if (tableid==0 )
    		throw new IllegalArgumentException("tableid is zero");
		else{
			this.setTableid(tableid);
		}
		if (name==null)
    		throw new IllegalArgumentException("name is Empty");
		else{
			
			this.setName(name);
		}
		if (quantity==0)
    		throw new IllegalArgumentException("quantity is zero");
		else{
			this.setQuantity(quantity);
		}
	}

	public int getTableid() {
		return tableid;
	}

	public void setTableid(int tableid) {
		this.tableid = tableid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}	
}
